<template>
  <div class="app-container">
    <!-- 轮播图 -->
    <Swiper :lunbotuList="lunbotuList" :isfull="true"></Swiper>
    <!-- 六宫格 -->
    <ul class="mui-table-view mui-grid-view mui-grid-9">
      <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
        <router-link to='' href="#">
          <img src="../../images/menu1.png" alt />
          <div class="mui-media-body">新闻资讯</div>
        </router-link>
      </li>
      <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
        <router-link to='' href="#">
          <img src="../../images/menu2.png" alt />
          <div class="mui-media-body">图片分享</div>
        </router-link>
      </li>
      <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
        <router-link to='' href="#">
          <img src="../../images/menu3.png" alt />
          <div class="mui-media-body">商品购买</div>
        </router-link>
      </li>
      <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
        <a href="#">
          <img src="../../images/menu4.png" alt />
          <div class="mui-media-body">留言反馈</div>
        </a>
      </li>
      <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
        <a href="#">
          <img src="../../images/menu5.png" alt />
          <div class="mui-media-body">视频专区</div>
        </a>
      </li>
      <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
        <a href="#">
          <img src="../../images/menu6.png" alt />
          <div class="mui-media-body">联系我们</div>
        </a>
      </li>
    </ul>
  </div>
</template>
<script>
import Swiper from "../lunbotu/Swiper";
import { Toast } from "mint-ui";
export default {
  data() {
    return {
      lunbotuList: []
    };
  },
  created() {
    this.getLunbotu();
  },
  components: {
    Swiper
  },
  methods: {
    getLunbotu() {
      console.log("123");
      this.$axios
        .get("api/getlunbo")
        .then(res => {
          if (res.status == 200) {
            Toast({
              message: "请求成功",
              position: "middle",
              duration: 1000
            });
            console.log(res);
            this.lunbotuList = res.data.message;
            console.log(this.lunbotuList);
          } else {
            Toast({
              message: "请求失败",
              position: "middle",
              duration: 3000
            });
          }
        })
        .catch(err => {
          Toast({
            message: "网络好像出问题了，请稍后重试：   " + err,
            position: "middle",
            duration: 5000
          });
        });
    }
  }
};
</script>
<style scoped >

.mint-swipe-item:nth-child(1) {
  background-color: lightpink;
}
.mint-swipe-item:nth-child(2) {
  background-color: lightblue;
}
.mint-swipe-item:nth-child(3) {
  background-color: lightcoral;
}
.mui-grid-view.mui-grid-9 {
  background-color: #fff;
  border: none;
}
.mui-icon {
  width: 50%;
}
.mui-grid-view.mui-grid-9 .mui-table-view-cell {
  border: none;
  /* width: 50%; */
}
/* .mui-grid-view.mui-grid-9 .mui-media .mui-icon {
  line-height: 50px;
  border-radius: 50%;
  background-color: lightblue;
} */
.mui-grid-view.mui-grid-9 .mui-table-view-cell img{
  width: 60px;
}
.mui-media-body{
  font-size: 13px;
}
</style>